/*
 * @Author: 尔尔
 * @Date: 2023-12-11 10:21:27
 * @LastEditors: 尔尔
 * @LastEditTime: 2023-12-12 17:50:43
 * @FilePath: \ERP_web\src\api\repair\repair.js
 * @filePurpose:
 */
import request from "@/utils/request"

// 查询返修单列表
export function listRepair(query) {
	return request({
		url: "/erp/repair/list",
		method: "get",
		params: query
	})
}

// 查询返修单详细
export function getRepair(id) {
	return request({
		url: "/erp/repair/" + id,
		method: "get"
	})
}

// 新增返修单
export function addRepair(data) {
	return request({
		url: "/erp/repair",
		method: "post",
		data: data
	})
}

// 修改返修单
export function updateRepair(data) {
	return request({
		url: "/erp/repair",
		method: "put",
		data: data
	})
}

// 删除返修单
export function delRepair(id) {
	return request({
		url: "/erp/repair/" + id,
		method: "delete"
	})
}

// 提交返修单
export function submitRepair(data) {
	return request({
		url: "/erp/repair/submitRepair",
		method: "post",
		data
	})
}

// 提交返修单产品
export function submitRepairProduct(data) {
	return request({
		url: "/erp/repair/submitRepairProduct",
		method: "post",
		data
	})
}

// 审批返修单
export function approverRepair(data) {
	return request({
		url: "/erp/repair/approverRepair",
		method: "post",
		data
	})
}

// 根据工作类型和id查询审批数据
export function approvalRecord(data) {
	return request({
		url: "/erp/repair/approvalRecord",
		method: "post",
		data
	})
}



// 退修此产品
export function retirementRepair(data) {
	return request({
		url: "/erp/repairProduct/retirementRepair",
		method: "post",
    data
	})
}



